-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: add type script plugin e2e #974
base: main
Are you sure you want to change the base?
Conversation
Code PushUp😟 Code PushUp report has regressed – compared current commit f0bee13 with previous commit c677fa2. 🕵️ See full comparison in Code PushUp portal 🔍 🏷️ Categories👎 3 groups regressed, 👎 5 audits regressed, 12 audits changed without impacting score🗃️ Groups
15 other groups are unchanged. 🛡️ Audits
579 other audits are unchanged. |
**This PR includes:** - docs - plugin exports - demo usage - @matejchalk any idea how we can use it best on our code? **Followup:** - #974 --------- Co-authored-by: Matěj Chalk <[email protected]>
expect( | ||
omitVariableReportData(reportJson, { omitAuditData: true }), | ||
).toMatchFileSnapshot('__snapshots__/typescript-plugin-json-report.json'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you omitting audit data? It significantly reduces test coverage - the runner output isn't being asserted at all. Unlike the Lighthouse plugin, I believe the audit outputs shoud be deterministic in this case.
plugins: [ | ||
await typescriptPlugin({ | ||
tsConfigPath: 'tsconfig.json', | ||
}), | ||
], | ||
categories: [ | ||
{ | ||
slug: 'typescript-quality', | ||
title: 'Typescript', | ||
refs: await getCategoryRefsFromGroups({ | ||
tsConfigPath: 'tsconfig.json', | ||
}), | ||
}, | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't tsConfigPath
renamed? I guess you can omit it anyway, since tsconfig.json
is the default value.
}, | ||
test: { | ||
reporters: ['basic'], | ||
testTimeout: 120_000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #976 you reduced the timeouts well below 2 mins for all E2E tests. I'm guessing the TS plugin could have a much lower timeout.
resolve: { | ||
alias: { | ||
'@code-pushup/test-nx-utils': '../../test-nx-utils/index.js', | ||
'@code-pushup/test-setup': '../../test-setup/index.js', | ||
'@code-pushup/test-utils': '../../test-utils/index.js', | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this configuration needed? Other E2E project's don't have it and tsconfigPathAlias
is being used already.
Co-authored-by: Matěj Chalk <[email protected]>
Percondition:
This PR includes: